Skip to content

Conversation

@angelozerr
Copy link
Contributor

@angelozerr angelozerr commented Jan 8, 2026

Support for debugging Qute template in Java annotation:

image

This PR requires:

After building Quarkus debugger with quarkusio/quarkus#51454 and use Quarkus LS redhat-developer/quarkus-ls#1093, you will need:

<dependency>
      <groupId>io.quarkus.qute</groupId>
      <artifactId>qute-generator</artifactId>
      <version>999-SNAPSHOT</version>
  </dependency>
  <dependency>
      <groupId>io.quarkus.qute</groupId>
      <artifactId>qute-core</artifactId>
      <version>999-SNAPSHOT</version>
  </dependency>
  <dependency>
      <groupId>io.quarkus.qute</groupId>
      <artifactId>qute-debug</artifactId>
      <version>999-SNAPSHOT</version>
  </dependency>
  <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-qute</artifactId>
      <version>999-SNAPSHOT</version>
  </dependency>
  <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-qute-deployment</artifactId>
      <version>999-SNAPSHOT</version>
  </dependency>
  • create a class with @TemplateContents like this:
package org.acme.quarkus.sample;

import io.quarkus.qute.TemplateContents;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.QueryParam;

import io.quarkus.qute.TemplateInstance;

@Path("hello")
public class HelloResource {

    @TemplateContents(value = "<p>Hello {name}!</p>")
    record Hello(String name) implements TemplateInstance {}

    @GET
    public TemplateInstance get(@QueryParam("name") String name) {
        return new Hello(name); 
    }
}
  • defines a launch (in launch.json) for Qute debugger like this:
{
      "name": "Debugging Qute Templates",
      "type": "qute",
      "request": "attach",
      "port": 4971
  }
  • update task.json with "command": "./mvnw quarkus:dev -DquteDebugPort=4971", (or start Quarkus app with the command quarkus:dev -DquteDebugPort=4971

  • start Quarkus app

  • start Qute debugger (update task.json with "command": "./mvnw quarkus:dev -DquteDebugPort=4971",

  • set a breakpoint in @TemplateContents line.

  • open your browser with http://localhost:8080/hello

  • breakpoint should be suspended

image

@angelozerr angelozerr force-pushed the qute_debug_in_java_annotation2 branch 3 times, most recently from abc7f65 to dd33852 Compare January 8, 2026 17:10
@angelozerr angelozerr requested a review from datho7561 January 8, 2026 18:10
@angelozerr angelozerr force-pushed the qute_debug_in_java_annotation2 branch from dd33852 to 6ee8569 Compare January 12, 2026 14:01
@angelozerr angelozerr self-assigned this Jan 12, 2026
@angelozerr angelozerr added this to the 1.22.1 milestone Jan 12, 2026
@angelozerr angelozerr moved this to In Progress in Java Tooling Jan 12, 2026
@angelozerr angelozerr force-pushed the qute_debug_in_java_annotation2 branch from 6ee8569 to dac1293 Compare January 13, 2026 08:27
@angelozerr angelozerr marked this pull request as ready for review January 13, 2026 08:49
@angelozerr angelozerr force-pushed the qute_debug_in_java_annotation2 branch from dac1293 to a52227d Compare January 14, 2026 11:37
@datho7561 datho7561 merged commit 295f868 into redhat-developer:master Jan 14, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Java Tooling Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants